<script setup>
import {reactive} from 'vue'
import {ref} from 'vue'
const state = reactive({
  count: 0
})
const count = ref(0)
const add = () => {
  state.count++
}
const add2 = () => {
  count.value++
}
</script>

<template>
  <div>
    <button @click="add">{{state.count}}</button>
  </div>
  <div>
    <button @click="add2">{{count}}</button>
  </div>
</template>
